//author:jxx
//此处是对表单的方法，组件，权限操作按钮等进行任意扩展(方法扩展可参照SellOrder.js)
let extension = {
  components: {
    //动态扩充组件或组件路径
    //表单header、content、footer对应位置扩充的组件
    gridHeader: "", //{ template: "<div>扩展组xx件</div>" },
    gridBody: "",
    gridFooter: "",
    //弹出框(修改、编辑、查看)header、content、footer对应位置扩充的组件
    modelHeader: "",
    modelBody: "",
    modelFooter: ""
  },
  buttons: { view: [], box: [], detail: [] }, //扩展的按钮
  methods: {
    //事件扩展
    onInit() {
      //在第二个按钮后添加一个新的按钮
      this.buttons.splice(2, 0, {
        name: "测试按钮",
        icon: "md-refresh",
        type: "info",
        onClick: function() {
          this.$Message.info("测试按钮");
        }
      });

      //
      this.maxBtnLength=9;


      this.columns.forEach(row => {
        //设置sort=true进行排序
        if (row.field == "SystemName"||row.field == "ModifyDate") {
          row.sort = true;
        }
      })
    }
  }
};
export default extension;
